<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta
      name="viewport"
      content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
    />
    <!-- Primary Meta Tags -->
    <title>Restish</title>
    <meta name="title" content="Restish" />
    <meta
      name="description"
      content="Restish is a CLI for interacting with REST-ish HTTP APIs with some nice features built-in"
    />

    <!-- Open Graph / Facebook -->
    <meta property="og:type" content="website" />
    <meta property="og:url" content="https://rest.sh/" />
    <meta property="og:title" content="Restish" />
    <meta
      property="og:description"
      content="Restish is a CLI for interacting with REST-ish HTTP APIs with some nice features built-in"
    />
    <meta
      property="og:image"
      content="https://repository-images.githubusercontent.com/264117985/f0d34600-9951-11ea-97c1-cf185c56f111"
    />

    <!-- Twitter -->
    <meta property="twitter:card" content="summary_large_image" />
    <meta property="twitter:url" content="https://rest.sh/" />
    <meta property="twitter:title" content="Restish" />
    <meta
      property="twitter:description"
      content="Restish is a CLI for interacting with REST-ish HTTP APIs with some nice features built-in"
    />
    <meta
      property="twitter:image"
      content="https://repository-images.githubusercontent.com/264117985/f0d34600-9951-11ea-97c1-cf185c56f111"
    />

    <!-- Favicon -->
    <link rel="icon" href="/favicon.png"/>

    <!-- Theme: Simple (latest v0.x.x) -->
    <link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css"
    />
    <style>
      :root {
        --base-font-size: 16px;
        --theme-color: #5fafd7;
        --link-color: #ff5f87;
        --code-theme-background: #333;
        --code-theme-text: #eee;
        --code-inline-background: #eee;
        --code-inline-color: #333;
        --notice-tip-border-color: #5fafd7;
        --notice-important-border-color: #ff5f87;
      }

      code[class*="language-"],
      pre[class*="language-"] {
        color: #ccc;
        background: none;
        font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
        font-size: 1em;
        text-align: left;
        white-space: pre;
        word-spacing: normal;
        word-break: normal;
        word-wrap: normal;
        line-height: 1.5;

        -moz-tab-size: 4;
        -o-tab-size: 4;
        tab-size: 4;

        -webkit-hyphens: none;
        -moz-hyphens: none;
        -ms-hyphens: none;
        hyphens: none;
      }

      /* Code blocks */
      pre[class*="language-"] {
        padding: 1em;
        margin: 0.5em 0;
        overflow: auto;
      }

      :not(pre) > code[class*="language-"],
      pre[class*="language-"] {
        background: #2d2d2d;
      }

      /* Inline code */
      :not(pre) > code[class*="language-"] {
        padding: 0.1em;
        border-radius: 0.3em;
        white-space: normal;
      }

      .token.comment,
      .token.block-comment {
        color: #9e9e9e;
      }

      .token.success,
      .token.operator {
        color: white;
      }

      .token.error {
        color: white;
        background-color: #ff5f87;
      }

      .token.property,
      .token.class-name,
      .token.constant,
      .token.symbol,
      .token.key,
      .token.keypress {
        color: #5fafd7;
      }

      .token.boolean,
      .token.null,
      .token.keyword {
        color: #ff5f87;
      }

      .token.number {
        color: #d78700;
      }

      .token.string,
      .token.char,
      .token.attr-value,
      .token.regex {
        color: #afd787;
      }

      .token.variable,
      .token.binary,
      .token.function {
        color: #ffd7d7;
      }

      .token.date {
        color: #af87af;
      }

      .token.uri, .token.url {
        color: #d6ffb7;
        font-style: italic;
      }

      .token.diffAdded {
        color: #afd787;
      }
      .token.diffModified {
        color: #d78700;
      }
      .token.diffRemoved {
        color: #ff5f87;
      }

      .token.warning {
        color: #d78700;
      }
    </style>
  </head>
  <body>
    <div id="app"></div>
    <script>
      window.$docsify = {
        name: "Restish",
        repo: "rest-sh/restish",
        loadSidebar: true,
        subMaxLevel: 3,
        search: "auto",
        auto2top: true,
        plugins: [
          function (hook, vm) {
            hook.afterEach(function (html) {
              return (
                html + '<hr/><div style="text-align:center"><a href="https://github.com/rest-sh/restish/blob/main/docs/' + vm.route.file + '">Edit this page on Github</a></div>'
              );
            });
          }
        ]
      };
    </script>
    <script src="//cdn.jsdelivr.net/npm/docsify@4/lib/docsify.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/docsify-pagination@2/dist/docsify-pagination.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/search.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/docsify-themeable@0"></script>
    <script src="//cdn.jsdelivr.net/npm/mermaid@9/dist/mermaid.js"></script>
    <script src="//cdn.jsdelivr.net/npm/docsify-mermaid@1/dist/docsify-mermaid.js"></script>
    <script>mermaid.initialize({ startOnLoad: true });</script>
    <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-http.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-json.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-yaml.min.js"></script>
    <script>
      // Custom "readable" language for Restish output, see `cli/lexer.go`.
      Prism.languages.readable = {
        response: {
          alias: "keyword",
          pattern: /^HTTP\/[12]\.[0-9].*/m,
          inside: {
            success: /[23][0-9]{2}\b.*/,
            error: /[45][0-9]{2}\b.*/,
          },
        },
        header: {
          pattern: /^[A-Z][a-zA-Z0-9-]+:.*/m,
          inside: {
            property: /[A-Z][a-zA-Z0-9-]+(?=:)/,
          },
        },
        property: /^\s+['"]?[a-z0-9-_$]+['"]?(?=:)/im,
        date: /"?20[0-9]{2}-[01][0-9]-[0-9]{2}(T[0-9:+-.]+Z?)?"?/,
        uri: /"([a-z]+:\/\/|\/).*"/,
        string: {
          pattern: /"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
          greedy: true,
        },
        binary: /\b0x[0-9a-f]+.../i,
        number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,
        boolean: /\b(?:true|false)\b/i,
        null: /\bnull\b/i,
      };

      Prism.languages.bash = {
        comment: /^\s*#.*/m,
        redirect: /2>\/dev\/null/,
        response: {
          pattern: /^(HTTP\/[12].*$)|((\{|\[)(.|\n)+(\]|\}(\n|$)))/gm,
          greedy: false,
          inside: Prism.languages.readable
        },
        uri: {
          pattern: /['"]?(https?:\/\/)?[a-z0-9.-]+\.(com|org|dev|sh)[\S{}]*['"]?/,
        },
        shorturi: {
          alias: "uri",
          pattern: /\s[a-z0-9_.-]+\/[a-zA-Z0-9_\.\/?=&{}-]*/,
        },
        date: {
          pattern: /"?20[0-9]{2}-[01][0-9]-[0-9]{2}(T[0-9:+-.]+Z?)?"?/,
        },
        httpdate: {
          alias: "date",
          pattern: /"?(Mon|Tue|Wed|Thu|Fri|Sat|Sun), [0-9]+ \S+ [0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2} GMT"?/,
        },
        variable: /[A-Z0-9_]+(?=[=])/,
        varuse: {
          alias: "variable",
          pattern: /\$[A-Z0-9_]+/,
        },
        log: {
          pattern: /(INFO|WARN|ERROR): .*/,
          inside: {
            warning: /WARN:/,
            error: /ERROR:/,
          },
        },
        header: {
          pattern: /-H [A-Z][a-zA-Z0-9-]+:\S+/,
          inside: {
            property: /[A-Z][a-zA-Z0-9-]+(?=:)/,
          },
        },
        queryparam: {
          pattern: /(-[qd] [a-z0-9-]+=\S+|[a-z0-9-]+==\S+)/i,
          inside: {
            property: /[a-z0-9-]+(?==)/i,
          },
        },
        string: {
          pattern: /("(?:\\.|[^\\"\r\n])*"(?!\s*:))|('(?:\\.|[^\\'\r\n])*'(?!\s*:))/,
          // pattern: /("(?:\\.|[^\\"\r\n])*"(?!\s*:))/,
          greedy: true,
        },
        keypress: /<\S+>/,
        diffAdded: /\s+added: /,
        diffModified: /\s+modified: /,
        diffRemoved: /\s+removed: /,
        property: /[A-Za-z0-9.-]+(?=[:[{][a-z0-9.^ _-\}[\]])/,
        number: /\b[0-9]+(\.[0-9]+)?/,
        boolean: /\b(?:true|false)\b/i,
        null: /\bnull\b/i,
        function: /contains|startsWith/,
        keyword: /restish|rb|<|>|[|]|\b(for|do|done)(?!\/)\b/,
      };
    </script>
  </body>
</html>
